#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<list>
#include<vector>
#include<string>
using namespace std;

#include"vector.h"

class Date
{
public:
	Date(int year = 1900, int month = 1, int day = 1)
		: _year(year)
		, _month(month)
		, _day(day)
	{}

	bool operator<(const Date& d) const
	{
		return (_year < d._year) ||
			(_year == d._year && _month < d._month) ||
			(_year == d._year && _month == d._month && _day < d._day);
	}

	bool operator>(const Date& d) const
	{
		return (_year > d._year) ||
			(_year == d._year && _month > d._month) ||
			(_year == d._year && _month == d._month && _day > d._day);
	}

	friend ostream& operator<<(ostream& _cout, const Date& d);
private:
	int _year;
	int _month;
	int _day;
};

template<class T>
bool Less(const T& left, const T& right)
{
	return left < right;
}

bool Less(Date* left, Date* right)
{
	return *left < *right;
}

int main()
{
	Date* d1 = new Date(2023, 10, 8);
	Date* d2 = new Date(2023, 10, 9);
	cout << Less(d1, d2) << endl;

	cout << Less(1, 2) << endl;


	//const int* p1;
	//int* const p2;


	return 0;
}
